package com.teamTPZoo.Util;

import org.apache.log4j.Logger;

import java.text.SimpleDateFormat;
import java.util.Calendar;

public class Dates {
	private Logger logger = Logger.getLogger(getClass());

    /**
     * @param String pattern
     * @return String
     */
    public static String getCurrentDate( String pattern )
    {
        if ( pattern == null ) {
            pattern = "yyyy-MM-dd";
        }

        SimpleDateFormat formatter = new SimpleDateFormat(pattern);
        Calendar c = Calendar.getInstance();

        return formatter.format(c.getTime());
    }
	
}
